package com.fancy.net.sock
{
	import com.fancy.framework.BundleManager;
	import com.fancy.framework.BundleModuleName;
	import com.fancy.framework.BundleNotice;
	import com.fancy.ui.notice.UIKeyNotice;
	import com.fancy.ui.notice.UINoticeType;
	
	import flash.events.Event;
	import flash.system.Security;

	public class SockCrossDomain extends SockBase
	{
		public function SockCrossDomain()
		{
			super();
		}
		
		override protected function preConstruct():void
		{
			super.preConstruct();
			Security.allowDomain("*");
		}
		
		override protected function connectHandler(event:Event):void
		{
			super.connectHandler(event);
			var notice:BundleNotice = new BundleNotice(UINoticeType.KEY_EVENT, UIKeyNotice.SOCKET_CROSS_DOMAIN_OK);
			BundleManager.instance.getLeaderByModuleName(BundleModuleName.USER_INTERFACE).execute(notice);
		}
		
	}
}